package com.ys.num3.Controller;

import com.ys.num3.Entity.Emp;
import com.ys.num3.Service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EmpController {
    @Autowired
    private EmpService service;

    @GetMapping("/emp")
    public Emp getEmpById(Integer id) {
        return service.getEmpById(id);
    }

}
